Execute Planner physical operators through typed deployment bindings - #774
Merged
Merged
Conversation
This reverts commit daa5281.
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deployments need to execute Planner-selected computation without maintaining a second interpretation of its operators. This PR consumes the physical-operator library from Planner #462 and connects typed query inputs, stored summaries, and protocol results to it.
Before this PR: Backend owned duplicate kernels and could lose semantics at the adapter boundary. For example, numeric semi-join keys were treated as absent labels, so
1 = 2could match; renamed candidate labels could also rewrite the wrong authoritative selector. Physical resource errors could become capability misses and trigger another engine.After this PR: Planner compiles selected Filter, Sort, Limit and semi-join fragments. Installed plans persist those physical fragments and their typed input contracts; runtime binds inputs and executes them. Label filters and numeric, renamed and multiple join keys retain their semantics. External Prometheus bindings fetch the selected authoritative subquery unchanged, and the native join compares its results. Invalid deployment input contracts fail before activation.
Physical errors preserve their original cause. Memory exhaustion and cancellation terminate instant and range execution without trying another engine or exact fallback. Fragments within one query evaluation share a run context. A concurrent revision change cannot mask terminal physical failures.
The Planner pin also fixes nested temporal aggregation schema derivation:
avg_over_time((sum by (job)(m))[6h:])preservesjoband replaces the actual sample column. Its regression covers schema derivation through physical Sort/Limit execution. Exposed query candidates now finalize exact accumulator state before returning query values; internal shared and persisted edges retain their state types. A second regression executes grouped Rate candidates on both sides of a persisted boundary.SDS follows #737/#749: Planner owns semantic definitions and logical dataset identity; deployment binds
stored_output_idanddefinition_id; recovery stays within the installed plan version. #763 and #765 extend precompute/query DAG integration; #728, #742 and #775 validate candidate structure, synthetic-cost selection and installed data-plane execution respectively.Scope: this foundation does not add arbitrary local raw Scan execution, ad-hoc SDS discovery, whole-process memory accounting, or HTTP-disconnect cancellation. Deployment source/storage availability remains distinct from operator support.
Validation: #774 passes 433 control-plane and 934 data-plane library tests and strict all-target Clippy. Planner passes 798 mapping/physical-operator tests, 219 type tests and 9 documentation tests. The downstream Level 1 inventory passes all four tests, synthetic Level 2 ranking passes, and the installed candidate sweep passes 23 executions with 66 comparisons against Prometheus. Logs remain local/CI artifacts, not repository files.